import React, { useState,} from 'react';
import {
  Form,
  Table,
  Input,
  Button,
  Select, 
  Divider,
  Breadcrumb, 
} from 'antd';

const columns = [
  {
    title: '实习计划',
    dataIndex: ' ',
    tip: '规则名称是唯一的 key',
    rules: [
      {
        required: true,
        message: '规则名称为必填项',
      },
    ],
    render: (dom, entity) => {
      return <a onClick={() => setRow(entity)}>{dom}</a>;
    },
  },
  {
    title: '参与项目',
    dataIndex: ' ',
    valueType: 'textarea',
  },
  {
    title: '参与范围',
    dataIndex: ' ', 
  },
  {
    title: '参与人数',
    dataIndex: ' ', 
  },
  {
    title: '检查人数 ',
    dataIndex: ' ', 
  }, 
  {
    title: '更新时间',
    dataIndex: 'updatedAt',
    sorter: true,
    valueType: 'dateTime',
    hideInForm: true,
    renderFormItem: (item, { defaultRender, ...rest }, form) => {
      const status = form.getFieldValue('status');
      if (`${status}` === '0') {
        return false;
      }
      if (`${status}` === '3') {
        return <Input {...rest} placeholder="请输入异常原因！" />;
      }
      return defaultRender(item);
    },
  },
  {
    title: '学生总数',
    dataIndex: ' ', 
  },  
  {
    title: '操作',
    dataIndex: 'option',
    valueType: 'option',
    render: (_, record) => (
      <>
        <a
          onClick={() => {
            handleUpdateModalVisible(true);
            setStepFormValues(record);
          }}
        >
          编辑
        </a> 
        <a>删除</a> 
      </>
    ),
  },
];




const InternshipExamine=(props)=> {
const [dataSource, setDataSource] = useState([])
const [createModalVisible, setCreateModalVisible] = useState<boolean>(false)

const handleAddStudent =()=>{
  setCreateModalVisible(true)
}
const handleHidden =()=>{
  setCreateModalVisible(false)
}

  return (
    <>
      <div>
        <Breadcrumb >
          <Breadcrumb.Item>首页</Breadcrumb.Item>
          <Breadcrumb.Item>实践教学</Breadcrumb.Item>
          <Breadcrumb.Item>实习检查</Breadcrumb.Item>
        </Breadcrumb> 
        <Form
          // form={form}
          layout="inline"
          size="middle" 
          name="basic"
          initialValues={{
            school: '',
            profession: '',
            grade: '',
            class: '',
            degree: '',
            studentStatus: '',
            accountStatus: '',
          }}
          // onFinish={handleSubmit}
        >
          <Form.Item label="院系" name="school">
            <Select>
              <Select.Option value="">全部</Select.Option>
            </Select>
          </Form.Item> 
          <Form.Item label="专业" name="studentStatus">
            <Select>
              <Select.Option value="">全部</Select.Option>
            </Select>
          </Form.Item>
          <Form.Item label="班级" name="accountStatus">
            <Select>
              <Select.Option value="">全部</Select.Option>
            </Select>
          </Form.Item>
          <Form.Item label="年级" name="accountStatus">
            <Select>
              <Select.Option value="">全部</Select.Option>
            </Select>
          </Form.Item>
          <Form.Item label="计划" name="accountStatus">
            <Select>
              <Select.Option value="">全部</Select.Option>
            </Select>
          </Form.Item>
          <Form.Item>
            <Button type="primary" htmlType="submit">
              搜索
            </Button>
          </Form.Item>
        </Form>
        <Table 
          rowKey="id"
          columns={columns}
          dataSource={dataSource} 
        />
      </div>
    </>
  );
}

export default InternshipExamine;
